/**
 * 新增部门信息
 */
var vm = new Vue({
	el : '#ltLTE',
	data : {
		department : {
			parent_code: "-1",
			parentName: null,
			orderNum: 0,
			depart_state: 0
		}
	},
	methods : {
		departTree : function() {
			dialogOpen({
				id : 'layerDepartTree',
				title : '选择部门',
				url : 'base/department/tree.html?_' + $.now(),
				scroll : true,
				width : "300px",
				height : "450px",
				yes : function(iframeId) {
					top.frames[iframeId].vm.acceptClick();
				}
			});
		},
		acceptClick : function() {
			if (!$('#form').Validform()) {
				return false;
			}
			$.SaveForm({
				url : '../../sys/depart/save?_' + $.now(),
				param : vm.department,
				success : function(data) {
					$.currentIframe().vm.load();
				}
			});
		}
	}

});